Flexible disabling of disk sets

ABSTRACT

The invention provides flexible disabling of disk sets. One or more disks in a RAID sub-system may be identified as temporarily inactive. The disk or disks are then marked as inactive by setting one of a set of bits associated with each disk in the RAID subsystem. If an inactivated disk is a data disk, marking it as inactive also marks it as read only. If an inactivated disk is a parity disk, the RAID group to which it supplies parity is also inactivated and a file system must look to a mirror of the inactivated RAID sub-system for its data. When a data disk is reactivated it is marked as read/write by clearing its associated bit. When a parity disk is reactivated it is also marked as read/write by clearing its bit, however, it is not available for use until it has synchronized its operation with its mirror.

CROSS-REFERENCE TO RELATED APPLICATION

This application is a continuation and claims the benefit of U.S. patentapplication Ser. No. 10/084,405, filed Feb. 25, 2002, now issued as U.S.Pat. No. 6,836,820 B1.

INCORPORATED DISCLOSURE

The invention described herein can be used in conjunction with theinvention described in the following application:

Application Ser. No. 08/071,643, filed in the name of David Hitz et.al., titled “Write Anywhere File-System Layout,” Express Mailing numberRB962032214US, filed Jun. 3, 1993.

BACKGROUND OF THE INVENTION

1. Field of the Invention

This invention relates to RAID subsystems.

2. Related Art

Redundant Array of Independent Disks (RAID) is a popular method forinformation storage. RAID comes in several configurations that offeradvantages over using a single storage device (such as faster datatransfers and an error recovery methodology).

At some point in the life of a RAID group there may be a desire todisable one or more disks in the system. RAID systems often start quitesmall and grow into large complex systems. As a RAID system grows, thelocation of its component parts can become fragmented. Locationfragmentation can make administration and maintenance of a systemtroublesome when, for example, each disk in a RAID group is located in adifferent rack or a different room.

The obvious solution is to move all the components of a RAID group toone location, such as, a single rack. Generally, this requires takingthe RAID or some portion of it off-line which is rarely an option.

A first known method that allows a disk to be disabled and thenreactivated is often used to replace a damaged disk in a RAID group.This is often referred to as hot swapping or hot plugging. Although thismethod allows a disk to be inactivated and then reactivated, it suffersfrom a severe disadvantage. When the disk is reactivated, reconstructionof the RAID group data can take several hours, and if another disk inthe group fails during this time the entire volume may be lost.

A second known method uses a change log to track any changes that takeplace relating to the inactivated disk in its absence. Although thismethod allows a disk to be inactivated and reactivated, it too suffersfrom a severe disadvantage. Tracking all the changes that need to bemade to the inactivated disk is a very complex operation. The greaterthe duration between inactivation of a disk and its reactivation, thegreater the likelihood that there will be more and more changesnecessary. Thus, this technique has only limited value directed towardshort term disabling of a disk in a RAID group.

Accordingly, it would be desirable to provide a technique for flexibledisabling of disk sets that is not subject to the limitations of theknown art.

SUMMARY OF THE INVENTION

The invention provides a method and system for flexible disabling ofdisk sets within a RAID group. In conjunction with the inventiondetailed in the incorporated disclosure (WAFL), the invention allows adisk to be disabled for long periods of time and then reactivatedwithout incurring overhead (such as, required reconstruction of a RAIDgroup).

Executing the following steps will allow a disk to be disabled. First,if WAFL is currently writing a consistency point, it should be allowedto complete the operation before continuing. Second, the disk to beinactivated is marked as “read-only.” At this point, the disk can bephysically removed and the data that would come from the inactivateddisk is reconstructed using the remaining disks (reconstruct on read).

After a disk has been inactivated, writes continue to the RAID groupusing the remaining active disks in the group. Most file systems “writein place.” This means that they overwrite old data with new data. WAFLalways writes to unallocated file space. According to the invention,files that are edited during inactivation of a drive are written intheir entirety to active disks, thus no data reconstruction is requiredwhen an inactivated disk is reactivated.

Executing the following steps will allow a disk to be reactivated.First, the disk must be physically connected. Second, the disk is markedas “read/write.” At this point, the disk is operating as it was prior tobeing disabled.

A parity disk may be disabled in a similar fashion, however, the entireRAID group must be disabled and a mirror RAID group should be used asthe read source. A RAID group cannot provide data reliably when itsparity disk is inactive. When the disabled parity disk is reactivated,it must be resynchronized with its mirror before it is allowed to resumeaccepting requests for reading and writing data.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 shows a block diagram of a system for flexible disabling of disksets.

FIG. 2 shows a block diagram of data paths between components in asystem for flexible disabling of disk sets.

FIG. 3 illustrates a process flow diagram for disk disabling in a methodfor flexible disabling of disk sets.

FIG. 4 illustrates a process flow diagram for disk enabling in a methodfor flexible disabling of disk sets.

DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENT

In the following description, a preferred embodiment of the invention isdescribed with regard to preferred process steps and data structures.Those skilled in the art would recognize after perusal of thisapplication that embodiments of the invention can be implemented usingone or more general purpose processors or special purpose processors orother circuits adapted to particular process steps and data structuresdescribed herein, and that implementation of the process steps and datastructures described herein would not require undue experimentation orfurther invention.

Lexicography

The following terms refer or relate to aspects of the invention asdescribed below. The descriptions of general meanings of these terms arenot intended to be limiting, only illustrative.

-   -   RAID—in general, short for Redundant Array of Independent (or        Inexpensive) Disks, a category of disk drives that employ two or        more drives in combination for fault tolerance and performance.    -   Disk Mirroring—in general, a technique in which data is written        to two duplicate disks simultaneously. When using two RAID        groups, data written to the first RAID group is also written to        the second RAID group. The second RAID group is said to be a        “mirror” of the first RAID group.

As noted above, these descriptions of general meanings of these termsare not intended to be limiting, only illustrative. Other and furtherapplications of the invention, including extensions of these terms andconcepts, would be clear to those of ordinary skill in the art afterperusing this application. These other and further applications are partof the scope and spirit of the invention, and would be clear to those ofordinary skill in the art, without further invention or undueexperimentation.

System Elements

FIG. 1 shows a block diagram of a system for flexible disabling of disksets.

A system 100 includes a filer 110, a RAID group 120, and a data link130.

The filer 110 includes a processor, a main memory, and software forexecuting instructions (not shown, but understood by one skilled in theart). This software preferably includes software for managing a RAIDstorage system according to the invention. Although the filer 110 andthe RAID group 120 are shown as separate devices, there is norequirement that they be physically separate.

The RAID group 120 includes two or more data disks 129 and a parity disk125. For example but without limitation, FIG. 1 illustrates four datadisks 129 labeled data disk a 121, data disk b 122, data disk c 123, anddata disk d 124. The parity disk 125 includes parity information relatedto each RAID stripe (not shown, but understood by one skilled in theart). RAID level 4 is used in a preferred embodiment; however, there isno requirement that RAID level 4 be used, and other levels of RAID mayalso be used. RAID level configurations are well-known in the art.

The RAID group 120 can include any one of a number of types of storage,including but not limited to, tape drives, hard disk drives, and opticaldrives. The RAID group 120 may also use these types of drives in variouscombinations.

The data link 130 couples the filer 110 to the RAID group 120.

In a preferred embodiment, the data link 130 includes a direct wiredconnection. In alternative embodiments, the data link 130 may includealternative forms of communication, such as the Internet, an intranet,extranet, virtual private network, wireless network, or some combinationthereof.

System Operation

FIG. 2 shows a block diagram of data paths between components in asystem for flexible disabling of disk sets.

A system 200 includes a file system 210, a RAID controller 220, and aset of off-line markers 230.

In a preferred embodiment, the file system 210 includes a WAFL filesystem as detailed in the incorporated disclosure.

The RAID controller 220 preferably includes a device capable of routingdata to and from the RAID group 120 in accordance to RAID level 4.

The set of off-line markers 230 include a set of binary memoryaddresses. Each one of the set of off-line markers 230 is individuallyassociated with a disk in the RAID group 120. A bit set for one of theset of off-line markers 230 indicates that the associated disk in theRAID group 120 is off-line.

Data disk b 122 and the parity disk 125 are used below to explainoperation of the invention. This is intended to be exemplary and notlimiting. The invention is applicable to any disk or combination ofdisks in a RAID group 120.

Normal Operation

Requests for data are sent by the file system 210 to the RAID controller220 which fetches the data from, or sends data to the RAID group.Responses to requests are sent back to the file system 210.

Data Disk Disabling and Reactivation

A data disk, such as data disk b 122, may be temporarily disabled. In apreferred embodiment the file system 210 used is a file system 210implementing WAFL. Upon being notified that data disk b 122 is to betaken off-line, WAFL ensures that if it is in the process of writing aconsistency point, the consistency point is written before proceeding.Data disk b 122 may now be marked as being off-line. The bit is set inthe off-line marker 230 associated with data disk b 122. At this pointthe data disk b 122 may be physically disconnected from the system.

When a data disk is marked as being off-line, the file system 210recognizes the off-line disk as being read only. Thus, the file system210 will not attempt to write any data to data disk b 122 since it ismarked as off-line. The data for data disk b 122 is still availableusing a reconstruct on read technique, which is well-known in the art.

WAFL provides an important benefit over other file systems with regardto disk disabling. WAFL never overwrites existing data like other filesystems that utilize “write in place.” Thus, even when disks arereactivated, the file system 210 is guaranteed to be consistent. Nocatch-up time is needed such as would be required in systems that use“change logs” or reconstruct data on previously disabled disks usingparity computation.

The data disk b 122 is reactivated by first ensuring that it isphysically connected to the RAID group 120, and second, that its bit inits associated off-line marker 230 is cleared. Once this isaccomplished, data disk b 122 has both read and write capability again.

Parity Disk Disabling and Reactivation

The parity disk 125 may be temporarily disabled, however, when a paritydisk 125 is disabled, the entire RAID group 120 must be taken off-line.This means that the RAID group 120 cannot be used even as a read onlysource for the data. Data may be read from a mirror of the off-line RAIDgroup 120.

The parity disk 125 is reactivated by first ensuring that the paritydisk 125 is physically connected to the RAID group 120. Second, the bitin its associated off-line marker 230 is cleared. This makes the paritydisk 125 writeable as well as readable. Third, the RAID group 120 mustbe synchronized with its mirror. Fourth, the RAID group 120 isreactivated and is now ready to accept requests.

Disk Disabling

FIG. 3 illustrates a process flow diagram for disk disabling in a methodfor flexible disabling of disk sets, indicated by general referencecharacter 300. The disk disabling process 300 initiates at a ‘start’terminal 301.

The disk disabling process 300 continues to a ‘notify file system’procedure 303 which notifies the file system 210 that a systems operatoror the system itself would like to disable a disk in the RAID group 120.For example, a systems operator may want to disable data disk b 122, andthus the file system 210 would be notified that a request has been madeto disable the disk.

An ‘is CP in progress?’ decision procedure 305 determines if the filesystem 210 is currently creating a consistency point. If it isdetermined that the file system 210 is creating a consistency point, thedisk disabling process 300 remains in the ‘is CP in progress’ decisionprocedure 305, otherwise the disk disabling process 300 continues to an‘is disk a parity disk’ decision procedure 307.

The ‘is disk a parity disk?’ decision procedure 307 determines if thedisk to be disabled is the parity disk 125. If it is determined that thedisk to be disabled is the parity disk 125, the disk disabling process300 continues to an ‘inactivate RAID group’ procedure 311.

A ‘mark disk read-only’ procedure 309 allows the disk to be marked asread only. This is accomplished by setting the bit for the associatedoff-line marker 230 for data disk b 122 (see FIG. 2 “marked asoff-line). At this point the physical unit may be turned off and moved.Data that would be supplied by data disk b 122 if it were still activeis still available by “reconstructing the data on read.” That is, datafrom the remaining operational disks may be used to reconstruct data onthe disabled data disk b 122. The disk disabling process 300 terminatesthrough an ‘end’ terminal 313.

An ‘inactivate RAID group’ procedure 311 allows the RAID group 120 to beinactivated. The disk disabling process 300 terminates through the ‘end’terminal 313. A RAID group 120 that has the parity disk 125 disabledcannot function. When the parity disk 125 is disabled, the file system210 must look to a mirror of the disabled RAID group 120 for its data.

Disk Enabling

Prior to starting this process, the disk to be enabled must bephysically connected to the RAID group 120.

FIG. 4 illustrates a process flow diagram for disk enabling in a methodfor flexible disabling of disk sets, indicated by general referencecharacter 400. The disk enabling process 400 initiates at a ‘start’terminal 401.

The disk enabling process 400 continues to an ‘is disk a parity disk?’decision procedure 403 that determines whether the disk to be enabled isthe parity disk 125. If it is determined that the disk to be enabled isthe parity disk 125, then the disk enabling process 400 continues to a‘mark parity disk as read/write’ procedure 407, otherwise the diskenabling process 400 continues to a ‘mark data disk as read/write’procedure 405.

The ‘mark data disk as read/write’ procedure 405 allows the data disk b122 to be marked as read/write. This is accomplished by clearing the bitfor the off-line marker 230 associated with data disk b 122. At thispoint the data disk b 122 is fully operational as an integral part ofthe RAID group 120. The disk enabling process 400 terminates through an‘end’ terminal 413.

The ‘mark parity disk as read/write’ procedure 407 allows the paritydisk 125 to be marked as read/write. This is accomplished by clearingthe bit for the off-line marker 230 associated with parity disk 125. Atthis point the parity disk is only available to the file system 210.

A ‘sync with mirror’ procedure 409 allows the previously disabled RAIDgroup 120 to synchronize with its mirror. No public access is allowed tothe RAID group 120 while synchronization is taking place.

A ‘reactivate RAID group’ procedure 411 allows the RAID group 120 to bereactivated. The disk enabling process 400 terminates through the ‘end’terminal 413. At this point the RAID group 120 is available to users ofthe system.

Generality of the Invention

The invention has applicability and generality to other aspects of datastorage on mass storage devices utilizing RAID including filers, caches,databases, and other memory storage systems.

Alternative Embodiments

Although preferred embodiments are disclosed herein, many variations arepossible which remain within the concept, scope, and spirit of theinvention, and these variations would become clear to those skilled inthe art after perusal of this application.

1. In a computer system having a file system that controls reads andwrites to a set of disks in a RAID group, a method including identifyinga parity disk requiring an operational status change, said operationalstatus indicating said parity disk is either online or off-line;responding, by said file system, to said identification by marking saidparity disk in said RAID group to indicate said operational status;controlling said entire RAID group's operational status responsive tosaid marking; and recording said operational status in one of a set ofoff-line markers, each said marker associated with at least one bit in abinary address.
 2. In a storage system including a RAID array, a methodincluding identifying a data disk in the RAID array requiring anoperational status change; determining a time when said operationalstatus change can be made to said data disk; marking said data disk toindicate said operational status change; and recording said operationalstatus in one of a set of off-line markers, each said marker associatedwith at least one bit in a binary address.
 3. In a storage systemincluding a RAID array, a method including identifying a parity disk inthe RAID array requiring an operational status change; determining atime when said operational status change can be made to said paritydisk; marking said parity disk to indicate said operational statuschange; and recording said operational status in one of a set ofoff-line markers, each said marker associated with at least one bit in abinary address.
 4. The method of claim 3, wherein the entire said RAIDarray is disabled responsive to said recording.
 5. The method of claim3, wherein the entire said RAID array is enabled responsive to saidrecording.
 6. A storage system having a sub-system that controls readsand writes to a RAID array, said sub-system including a memory and aprocessor, wherein said memory includes an instruction for identifyingat least one data disk in the RAID array requiring an operational statuschange; an instruction for determining a time for effecting saidoperational status change of said at least one data disk; an instructionfor marking said at least one data disk to indicate said operationalstatus change; an instruction for recording said operational statuschange in at least one of a set of off-line markers, each said markerassociated with at least one bit in a binary address and at least onedata disk in the RAID array.
 7. A storage system having a sub-systemthat controls reads and writes to a RAID array, said sub-systemincluding a memory and a processor, wherein said memory includes aninstruction for identifying at least one parity disk in the RAID arrayrequiring an operational status change; an instruction for determining atime for effecting said operational status change of said at least oneparity disk; an instruction for marking said at least one parity disk toindicate said operational status change; an instruction for recordingsaid operational status change in at least one of a set of off-linemarkers, each said marker associated with at least one bit in a binaryaddress and at least one parity disk in the RAID array.
 8. The storagesystem of claim 7, wherein the entire said RAID array is disabledresponsive to said instruction for recording.
 9. The storage system ofclaim 7, wherein the entire said RAID array is enabled responsive tosaid instruction for recording.
 10. A method comprising: identifying, ina storage redundancy group, a storage device requiring an operationalstatus change; waiting until said operational status change can be madeto said storage device; marking said storage device to indicate saidoperational status change; and recording said operational status in oneof a set of off-line markers, each said marker associated with at leastone bit in a binary address.
 11. The method of claim 10, wherein thestorage redundancy group comprises a RAID array and the storage devicecomprises a disk in the RAID array.
 12. The method of claim 11, whereinthe disk comprises a data disk.
 13. The method of claim 11, wherein thedisk comprises a parity disk.
 14. The method of claim 13 furthercomprising changing the entire RAID array's operational status.